/**  
 * File Name:SpecialStringSerializer.java  
 * Package Name:com.suneee.core.util  
 * Description: (That's the purpose of the file)
 * Date:2015年1月19日上午10:19:46  
 * Copyright (c) 2015, forint.lee@qq.com All Rights Reserved.  
 *  
*/

package com.base.core.type;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

/**  
 * ClassName:SpecialStringSerializer <br/>  
 * Description:That's the purpose of the class
 * Date:     2015年1月19日 上午10:19:46 <br/>  
 * @author   Forint  
 * @version  V1.0  
 * @see        
 */
public class SpecialStringSerializer extends JsonSerializer<String>{

	@Override
	public void serialize(String value, JsonGenerator jgen,
			SerializerProvider provider) throws IOException,
			JsonProcessingException {
		if(value!=null){
			jgen.writeString(value.trim());
		}
	}
}
  
